package lab02.test31;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by MECHREV on 2017/11/2.
 */
public class Test01 {
    public static void main(String[] args) {
        List<String> names = new ArrayList<String>();
        names.add("张三");
        names.add("李四");
        names.add("王五");
        names.add("马六");
        names.add("赵七");
        for (String name : names){
            System.out.println(names.indexOf(name)+"|"+name);
        }
        System.out.println("集合的大小:"+names.size());
        String delName =names.remove(2);//删除第几个元素
        System.out.println("删除的第三个元素是："+delName);
        System.out.println(names.get(2));
    }
}
